package com.wangy.sct.common.core;

/**
 * EnumName: SctEnum <br/>
 * Description: 系统名称_形容词_动词_名词 <br/>
 *
 * @author wangyue
 * @version V1.0.0
 * @date 2018/11/5 5:21 PM
 */
public enum SctEnum implements SctExceptionDescription {
	/**
	 *
	 */
	SUCCESS("0", "SUCCESS"),

	/**
	 *
	 */
	USER_NOT_EXIST("1000", "用户不存在"),

	/**
	 *
	 */
	AUTH_EXPIRED_TOKEN("8000", "TOKEN超时"),

	/**
	 *
	 */
	AUTH_FAILED_VERIFY_TOKEN("8001", "TOKEN验证不通过"),

	/**
	 *
	 */
	AUTH_ERROR_GENERATE_TOKEN("8002", "生成TOKEN失败"),

	/**
	 *
	 */
	AUTH_ERROR_CLAIM_TOKEN("8003", "TOKEN内容有误"),

	/**
	 *
	 */
	ILLEGAL_ARGUMENT("0001", "请求参数错误"),

	/**
	 *
	 */
	UNKNOWEN_EXCEPTION("0009", "未知系统异常"),
	;

	/**
	 * @Description:
	 * @param: [retCode]
	 * @return: boolean
	 * @author: wangyue
	 * @Date: 2018/11/7 6:49 PM
	 */
	public static boolean isSuccess(String retCode) {
		return SUCCESS.getErrCode().equals(retCode);
	}

	private String errCode;
	private String message;

	SctEnum(String errCode, String message) {
		this.errCode = errCode;
		this.message = message;
	}

	public String getErrCode() {
		return this.errCode;
	}

	public String getMessage() {
		return this.message;
	}
}
